/**
 * Copyright 2011-2015 Newegg.com. All rights reserved.
 */
package com.arslan.cn.controller;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.springframework.validation.BindException;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractCommandController;

import com.arslan.cn.domain.User;

/**
 * 
 * @author zz33
 * @version $id:LoginController.java,v 0.1 2011-5-7 上午10:13:27 zz33 Exp$
 */

@SuppressWarnings("deprecation")
public class LoginController extends AbstractCommandController {
	private static Logger	log	= Logger.getLogger(LoginController.class);

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.springframework.web.servlet.mvc.AbstractCommandController#handle(
	 * javax.servlet.http.HttpServletRequest,
	 * javax.servlet.http.HttpServletResponse, java.lang.Object,
	 * org.springframework.validation.BindException)
	 */
	@Override
	protected ModelAndView handle(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, BindException arg3)
			throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	protected ModelAndView handleRequestInternal(HttpServletRequest arg0, HttpServletResponse arg1) throws Exception {
		User stu1 = new User();
		stu1.setName("gaoxiang1");
		stu1.setSex("male1");
		User stu2 = new User();
		stu2.setName("gaoxiang2");
		stu2.setSex("male2");
		List a = new ArrayList();
		a.add(stu1);
		a.add(stu2);
		System.out.println(a);
		return new ModelAndView("success", "studentList", a);
	}

}
